
Imports cmplib01


Public Class frmDeployment

    Private _deployCancelled As Boolean

    Private ptrBaseBG As BattlegroupChit
    Private ptrGame As CampaignerGameData
    Private ptrdepZone As DeploymentZone

    Public Overloads Sub ShowDialog(ByRef game As CampaignerGameData, ByRef depZone As DeploymentZone, ByRef BG As BattlegroupChit, ByVal moveTypes As String())

        ptrBaseBG = BG
        ptrGame = game
        ptrdepZone = depZone

        cgGroups.moveTypeNames = moveTypes
        cgGroups.Game = ptrGame
        cgGroups.BaseBattleGroup = ptrBaseBG
        cgGroups.DeploymentZone = ptrdepZone

        MyBase.ShowDialog()
    End Sub

    Public ReadOnly Property DeployCancelled() As Boolean
        Get
            Return _deployCancelled
        End Get
    End Property


    Private Sub btnDeploy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeploy.Click
        If cgGroups.IsValid = False Then
            _deployCancelled = True
        Else
            _deployCancelled = False
        End If

        Me.Hide()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        _deployCancelled = True
        Me.Hide()

    End Sub
End Class